package com.eduhzy.ttw.teacher.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.eduhzy.ttw.teacher.mvp.contract.NoticeDetailContract;
import com.eduhzy.ttw.teacher.mvp.model.NoticeDetailModel;

/**
 * @author xubo
 * @date 2018-10-12 16:56:47
 */
@Module
public class NoticeDetailModule {
    private NoticeDetailContract.View view;

    /**
     * 构建NoticeDetailModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public NoticeDetailModule(NoticeDetailContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    NoticeDetailContract.View provideNoticeDetailView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    NoticeDetailContract.Model provideNoticeDetailModel(NoticeDetailModel model) {
        return model;
    }
}